{% extends 'base.html' %}

{% block content %}

<form action="{% url 'go_status' %}" method="post">
    <div class="btn-group" role="group">
        {% for hostname in hosts %}
            <button type="submit" class="btn btn-default" name="hostname" value="{{ hostname.hostname_id }}">{{ hostname.hostname.saltname }}</button>
        {% endfor %}
    </div>
</form>



<div class="wrapper wrapper-content animated fadeIn">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins" id="all">
                <div class="ibox-title">
                    <h5> Services详细信息列表</h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                            <i class="fa fa-wrench"></i>
                        </a>
                        <a class="close-link">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>

                <div class="ibox-content">
                        <table class="table table-striped table-bordered table-hover " id="editable" name="editable">
                            <thead>
                                <tr>
                                    <th class="text-center"> State </th>
                                    <th class="text-center"> Description </th>
                                    <th class="text-center"> Name </th>
                                    <th class="text-center"> Logfile </th>
                                </tr>
                            </thead>
                            <tbody>
                            {% for info in status %}
                                <tr class="gradeX">
                                    <td class="text-center"> {{ info.statename }}</td>
                                    <td class="text-center"> {{ info.description }}</td>
                                    <td class="text-center"> {{ info.name }} </td>
                                    <td class="text-center"> {{ info.logfile }} </td>
                                </tr>
                            {% endfor %}
                            </tbody>
                        </table>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}

